<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>Faiss: faiss::Clustering Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Faiss
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Friends</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespacefaiss.html">faiss</a></li><li class="navelem"><a class="el" href="structfaiss_1_1Clustering.html">Clustering</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="structfaiss_1_1Clustering-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">faiss::Clustering Struct Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="Clustering_8h_source.html">Clustering.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for faiss::Clustering:</div>
<div class="dyncontent">
 <div class="center">
  <img src="structfaiss_1_1Clustering.png" usemap="#faiss::Clustering_map" alt=""/>
  <map id="faiss::Clustering_map" name="faiss::Clustering_map">
<area href="structfaiss_1_1ClusteringParameters.html" alt="faiss::ClusteringParameters" shape="rect" coords="0,0,165,24"/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:ad61a631598a1ac0975c091bda9072da7"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad61a631598a1ac0975c091bda9072da7"></a>
typedef <a class="el" href="structfaiss_1_1Index.html#ad3f0d3071f987baabbdd3da4500c87ea">Index::idx_t</a>&#160;</td><td class="memItemRight" valign="bottom"><b>idx_t</b></td></tr>
<tr class="separator:ad61a631598a1ac0975c091bda9072da7"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a2fa90a2681dc42faaf2435e63a5ae9b4"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2fa90a2681dc42faaf2435e63a5ae9b4"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfaiss_1_1Clustering.html#a2fa90a2681dc42faaf2435e63a5ae9b4">Clustering</a> (int <a class="el" href="structfaiss_1_1Clustering.html#afbf6efacae54c58586b75ed790facd74">d</a>, int <a class="el" href="structfaiss_1_1Clustering.html#a87581785d9516c683bbc7c9392bfa993">k</a>)</td></tr>
<tr class="memdesc:a2fa90a2681dc42faaf2435e63a5ae9b4"><td class="mdescLeft">&#160;</td><td class="mdescRight">the only mandatory parameters are k and d <br/></td></tr>
<tr class="separator:a2fa90a2681dc42faaf2435e63a5ae9b4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afd25cc6832b576ce4d0d7430e8ee3bff"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afd25cc6832b576ce4d0d7430e8ee3bff"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>Clustering</b> (int <a class="el" href="structfaiss_1_1Clustering.html#afbf6efacae54c58586b75ed790facd74">d</a>, int <a class="el" href="structfaiss_1_1Clustering.html#a87581785d9516c683bbc7c9392bfa993">k</a>, const <a class="el" href="structfaiss_1_1ClusteringParameters.html">ClusteringParameters</a> &amp;cp)</td></tr>
<tr class="separator:afd25cc6832b576ce4d0d7430e8ee3bff"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a839f210abb11c7a1c7162e336e0ff9cf"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a839f210abb11c7a1c7162e336e0ff9cf"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfaiss_1_1Clustering.html#a839f210abb11c7a1c7162e336e0ff9cf">train</a> (idx_t n, const float *x, <a class="el" href="structfaiss_1_1Index.html">faiss::Index</a> &amp;index)</td></tr>
<tr class="memdesc:a839f210abb11c7a1c7162e336e0ff9cf"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="structfaiss_1_1Index.html">Index</a> is used during the assignment stage. <br/></td></tr>
<tr class="separator:a839f210abb11c7a1c7162e336e0ff9cf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adcb47440a792267bb9218c10378cf1a8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfaiss_1_1Clustering.html#adcb47440a792267bb9218c10378cf1a8">post_process_centroids</a> ()</td></tr>
<tr class="separator:adcb47440a792267bb9218c10378cf1a8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_structfaiss_1_1ClusteringParameters"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_structfaiss_1_1ClusteringParameters')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="structfaiss_1_1ClusteringParameters.html">faiss::ClusteringParameters</a></td></tr>
<tr class="memitem:a86c8802261041f5d49b1a0d296da60be inherit pub_methods_structfaiss_1_1ClusteringParameters"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a86c8802261041f5d49b1a0d296da60be"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfaiss_1_1ClusteringParameters.html#a86c8802261041f5d49b1a0d296da60be">ClusteringParameters</a> ()</td></tr>
<tr class="memdesc:a86c8802261041f5d49b1a0d296da60be inherit pub_methods_structfaiss_1_1ClusteringParameters"><td class="mdescLeft">&#160;</td><td class="mdescRight">sets reasonable defaults <br/></td></tr>
<tr class="separator:a86c8802261041f5d49b1a0d296da60be inherit pub_methods_structfaiss_1_1ClusteringParameters"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:afbf6efacae54c58586b75ed790facd74"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afbf6efacae54c58586b75ed790facd74"></a>
size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfaiss_1_1Clustering.html#afbf6efacae54c58586b75ed790facd74">d</a></td></tr>
<tr class="memdesc:afbf6efacae54c58586b75ed790facd74"><td class="mdescLeft">&#160;</td><td class="mdescRight">dimension of the vectors <br/></td></tr>
<tr class="separator:afbf6efacae54c58586b75ed790facd74"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a87581785d9516c683bbc7c9392bfa993"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a87581785d9516c683bbc7c9392bfa993"></a>
size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfaiss_1_1Clustering.html#a87581785d9516c683bbc7c9392bfa993">k</a></td></tr>
<tr class="memdesc:a87581785d9516c683bbc7c9392bfa993"><td class="mdescLeft">&#160;</td><td class="mdescRight">nb of centroids <br/></td></tr>
<tr class="separator:a87581785d9516c683bbc7c9392bfa993"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a64c5ec0b4a7967d8be2872974b455ff1"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a64c5ec0b4a7967d8be2872974b455ff1"></a>
std::vector&lt; float &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfaiss_1_1Clustering.html#a64c5ec0b4a7967d8be2872974b455ff1">centroids</a></td></tr>
<tr class="memdesc:a64c5ec0b4a7967d8be2872974b455ff1"><td class="mdescLeft">&#160;</td><td class="mdescRight">centroids (k * d) <br/></td></tr>
<tr class="separator:a64c5ec0b4a7967d8be2872974b455ff1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a91e32da946477bb751706a68c5cd3327"><td class="memItemLeft" align="right" valign="top">std::vector&lt; float &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfaiss_1_1Clustering.html#a91e32da946477bb751706a68c5cd3327">obj</a></td></tr>
<tr class="separator:a91e32da946477bb751706a68c5cd3327"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_attribs_structfaiss_1_1ClusteringParameters"><td colspan="2" onclick="javascript:toggleInherit('pub_attribs_structfaiss_1_1ClusteringParameters')"><img src="closed.png" alt="-"/>&#160;Public Attributes inherited from <a class="el" href="structfaiss_1_1ClusteringParameters.html">faiss::ClusteringParameters</a></td></tr>
<tr class="memitem:a5c7c6f05c75e1668befdb3be148fd5f9 inherit pub_attribs_structfaiss_1_1ClusteringParameters"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5c7c6f05c75e1668befdb3be148fd5f9"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfaiss_1_1ClusteringParameters.html#a5c7c6f05c75e1668befdb3be148fd5f9">niter</a></td></tr>
<tr class="memdesc:a5c7c6f05c75e1668befdb3be148fd5f9 inherit pub_attribs_structfaiss_1_1ClusteringParameters"><td class="mdescLeft">&#160;</td><td class="mdescRight">clustering iterations <br/></td></tr>
<tr class="separator:a5c7c6f05c75e1668befdb3be148fd5f9 inherit pub_attribs_structfaiss_1_1ClusteringParameters"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a11a049c40c376c57ac6cc3b8d5d1d58b inherit pub_attribs_structfaiss_1_1ClusteringParameters"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a11a049c40c376c57ac6cc3b8d5d1d58b"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfaiss_1_1ClusteringParameters.html#a11a049c40c376c57ac6cc3b8d5d1d58b">nredo</a></td></tr>
<tr class="memdesc:a11a049c40c376c57ac6cc3b8d5d1d58b inherit pub_attribs_structfaiss_1_1ClusteringParameters"><td class="mdescLeft">&#160;</td><td class="mdescRight">redo clustering this many times and keep best <br/></td></tr>
<tr class="separator:a11a049c40c376c57ac6cc3b8d5d1d58b inherit pub_attribs_structfaiss_1_1ClusteringParameters"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a932139ba9b62b37d9121b4c6a4518b52 inherit pub_attribs_structfaiss_1_1ClusteringParameters"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a932139ba9b62b37d9121b4c6a4518b52"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>verbose</b></td></tr>
<tr class="separator:a932139ba9b62b37d9121b4c6a4518b52 inherit pub_attribs_structfaiss_1_1ClusteringParameters"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad997fb511f574f7ddc69938c21612f8d inherit pub_attribs_structfaiss_1_1ClusteringParameters"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad997fb511f574f7ddc69938c21612f8d"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfaiss_1_1ClusteringParameters.html#ad997fb511f574f7ddc69938c21612f8d">spherical</a></td></tr>
<tr class="memdesc:ad997fb511f574f7ddc69938c21612f8d inherit pub_attribs_structfaiss_1_1ClusteringParameters"><td class="mdescLeft">&#160;</td><td class="mdescRight">do we want normalized centroids? <br/></td></tr>
<tr class="separator:ad997fb511f574f7ddc69938c21612f8d inherit pub_attribs_structfaiss_1_1ClusteringParameters"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae01573d8d4cbff7c3d6eaded883537a4 inherit pub_attribs_structfaiss_1_1ClusteringParameters"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae01573d8d4cbff7c3d6eaded883537a4"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfaiss_1_1ClusteringParameters.html#ae01573d8d4cbff7c3d6eaded883537a4">int_centroids</a></td></tr>
<tr class="memdesc:ae01573d8d4cbff7c3d6eaded883537a4 inherit pub_attribs_structfaiss_1_1ClusteringParameters"><td class="mdescLeft">&#160;</td><td class="mdescRight">round centroids coordinates to integer <br/></td></tr>
<tr class="separator:ae01573d8d4cbff7c3d6eaded883537a4 inherit pub_attribs_structfaiss_1_1ClusteringParameters"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a27d6192097920fa981cff0acedfaac91 inherit pub_attribs_structfaiss_1_1ClusteringParameters"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a27d6192097920fa981cff0acedfaac91"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfaiss_1_1ClusteringParameters.html#a27d6192097920fa981cff0acedfaac91">update_index</a></td></tr>
<tr class="memdesc:a27d6192097920fa981cff0acedfaac91 inherit pub_attribs_structfaiss_1_1ClusteringParameters"><td class="mdescLeft">&#160;</td><td class="mdescRight">update index after each iteration? <br/></td></tr>
<tr class="separator:a27d6192097920fa981cff0acedfaac91 inherit pub_attribs_structfaiss_1_1ClusteringParameters"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad142063e035f2a0414233f9711e16215 inherit pub_attribs_structfaiss_1_1ClusteringParameters"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad142063e035f2a0414233f9711e16215"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfaiss_1_1ClusteringParameters.html#ad142063e035f2a0414233f9711e16215">frozen_centroids</a></td></tr>
<tr class="memdesc:ad142063e035f2a0414233f9711e16215 inherit pub_attribs_structfaiss_1_1ClusteringParameters"><td class="mdescLeft">&#160;</td><td class="mdescRight">use the centroids provided as input and do not change them during iterations <br/></td></tr>
<tr class="separator:ad142063e035f2a0414233f9711e16215 inherit pub_attribs_structfaiss_1_1ClusteringParameters"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5af907901147a9b1e748b13305839924 inherit pub_attribs_structfaiss_1_1ClusteringParameters"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5af907901147a9b1e748b13305839924"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfaiss_1_1ClusteringParameters.html#a5af907901147a9b1e748b13305839924">min_points_per_centroid</a></td></tr>
<tr class="memdesc:a5af907901147a9b1e748b13305839924 inherit pub_attribs_structfaiss_1_1ClusteringParameters"><td class="mdescLeft">&#160;</td><td class="mdescRight">otherwise you get a warning <br/></td></tr>
<tr class="separator:a5af907901147a9b1e748b13305839924 inherit pub_attribs_structfaiss_1_1ClusteringParameters"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a993e0a035248faad6e292a5ef9af1953 inherit pub_attribs_structfaiss_1_1ClusteringParameters"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a993e0a035248faad6e292a5ef9af1953"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfaiss_1_1ClusteringParameters.html#a993e0a035248faad6e292a5ef9af1953">max_points_per_centroid</a></td></tr>
<tr class="memdesc:a993e0a035248faad6e292a5ef9af1953 inherit pub_attribs_structfaiss_1_1ClusteringParameters"><td class="mdescLeft">&#160;</td><td class="mdescRight">to limit size of dataset <br/></td></tr>
<tr class="separator:a993e0a035248faad6e292a5ef9af1953 inherit pub_attribs_structfaiss_1_1ClusteringParameters"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a509c65e2ebe6ecabebd163ecb03c5579 inherit pub_attribs_structfaiss_1_1ClusteringParameters"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a509c65e2ebe6ecabebd163ecb03c5579"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfaiss_1_1ClusteringParameters.html#a509c65e2ebe6ecabebd163ecb03c5579">seed</a></td></tr>
<tr class="memdesc:a509c65e2ebe6ecabebd163ecb03c5579 inherit pub_attribs_structfaiss_1_1ClusteringParameters"><td class="mdescLeft">&#160;</td><td class="mdescRight">seed for the random number generator <br/></td></tr>
<tr class="separator:a509c65e2ebe6ecabebd163ecb03c5579 inherit pub_attribs_structfaiss_1_1ClusteringParameters"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>clustering based on assignment - centroid update iterations</p>
<p>The clustering is based on an <a class="el" href="structfaiss_1_1Index.html">Index</a> object that assigns training points to the centroids. Therefore, at each iteration the centroids are added to the index.</p>
<p>On output, the centoids table is set to the latest version of the centroids and they are also added to the index. If the centroids table it is not empty on input, it is also used for initialization.</p>
<p>To do several clusterings, just call <a class="el" href="structfaiss_1_1Clustering.html#a839f210abb11c7a1c7162e336e0ff9cf" title="Index is used during the assignment stage. ">train()</a> several times on different training sets, clearing the centroid table in between. </p>

<p>Definition at line <a class="el" href="Clustering_8h_source.html#l00056">56</a> of file <a class="el" href="Clustering_8h_source.html">Clustering.h</a>.</p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="adcb47440a792267bb9218c10378cf1a8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void faiss::Clustering::post_process_centroids </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Post-process the centroids after each centroid update. includes optional L2 normalization and nearest integer rounding </p>

<p>Definition at line <a class="el" href="Clustering_8cpp_source.html#l00063">63</a> of file <a class="el" href="Clustering_8cpp_source.html">Clustering.cpp</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a class="anchor" id="a91e32da946477bb751706a68c5cd3327"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::vector&lt;float&gt; faiss::Clustering::obj</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>objective values (sum of distances reported by index) over iterations </p>

<p>Definition at line <a class="el" href="Clustering_8h_source.html#l00066">66</a> of file <a class="el" href="Clustering_8h_source.html">Clustering.h</a>.</p>

</div>
</div>
<hr/>The documentation for this struct was generated from the following files:<ul>
<li>/data/users/hoss/faiss/<a class="el" href="Clustering_8h_source.html">Clustering.h</a></li>
<li>/data/users/hoss/faiss/<a class="el" href="Clustering_8cpp_source.html">Clustering.cpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.5
</small></address>
</body>
</html>
